package com.msdp.service;

import com.msdp.dto.Result;
import com.msdp.entity.Blog;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 虎哥
 * @since 2021-12-22
 */
public interface IBlogService extends IService<Blog> {

    Result getBlogById(Long id);

    Result likeBlog(Long id);

    Result queryHotBlog(Integer current);

    Result getLikesById(Long id);
    /**
     * 根据id查询用户发布的博客信息
     * @param userId
     * @param current
     * @return
     */
    Result queryUserBlog(Long userId, Integer current);

    /**
     * 新增博客
     * @param blog
     * @return
     */
    Result saveBlog(Blog blog);
    /**
     * 查询关注用户推文
     * @param lastId
     * @param offset
     * @return
     */
    Result queryFollowBlog(Long lastId, Integer offset);
}
